package com.fc.advbox.service.impl;

import com.fc.advbox.dao.SessionEntityDao;
import com.fc.advbox.entity.SessionEntity;
import com.fc.advbox.service.ISessionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class SessionServiceImpl implements ISessionService{

    @Autowired
    private SessionEntityDao sessionDao;

    @Override
    public SessionEntity getSession(String sessionId) {
        return sessionDao.queryBySessionId(sessionId);
    }

    @Override
    public void save(SessionEntity session) {
        sessionDao.save(session);
    }

    @Override
    public void update(SessionEntity session) {
        sessionDao.update(session);
    }

    @Override
    public void delete(String sessionId) {
        sessionDao.delete(sessionId);
    }
}
